package Day11.Ti.ZiFu;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Ti02 {
    public static void main(String[] args) throws IOException {
        List<String> stus = new ArrayList<>();
        stus.add("刘亦菲");
        stus.add("赵丽颖");
        stus.add("段奕宏");
        stus.add("孙红雷");
        FileWriter fw=new FileWriter("H:\\itheima\\aa\\学生名单.txt",true);
        for (String s : stus) {
            fw.write(s);
            fw.write("\r\n");
        }
        fw.flush();
        fw.close();
    }
}
